package com.slmxz.tms.biz.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.slmxz.tms.biz.model.vo.OrderVO;
import com.slmxz.tms.biz.model.vo.TransitVO;
import com.slmxz.tms.biz.service.TransitService;
import com.slmxz.tms.common.model.Query;
import com.slmxz.tms.common.result.PageResult;
import com.slmxz.tms.common.support.Condition;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 管理员在途订单管理接口前端控制层
 *
 * @author sunyao
 *@Date 2025-07-20 14:13
 */
@Tag(name = "在途订单接口")
@RestController
@RequestMapping("/biz/transit")
@RequiredArgsConstructor
public class TransitController {

    private final TransitService transitService;

    @Operation(summary = "管理员在途订单分页")
    @GetMapping("/page")
    public PageResult<?> selectOrderPage(Query query, TransitVO transit) {
        IPage<TransitVO> result = this.transitService
                .selectTransitPage(Condition.getPage(query),transit);
        return PageResult.success(result);
    }

}
